import request from '@/utils/request'

// 查询命令列表
export function listCommand(query) {
  return request({
    url: '/system/command/list',
    method: 'get',
    params: {
      ...query,
      videoId: query.videoId,
      videoBv: query.videoBv
    }
  })
}

// 查询视频关联指令详细
export function getCommand(id) {
  return request({
    url: '/system/command/' + id,
    method: 'get'
  })
}

// 新增视频关联指令
export function addCommand(data) {
  return request({
    url: '/system/command',
    method: 'post',
    data: data
  })
}

// 修改视频关联指令
export function updateCommand(data) {
  return request({
    url: '/system/command',
    method: 'put',
    data: data
  })
}

// 删除视频关联指令
export function delCommand(id) {
  return request({
    url: '/system/command/' + id,
    method: 'delete'
  })
}
